package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.Set;


/**
 * The persistent class for the TM_BANCO database table.
 * 
 */
@Entity
@Table(name="TM_BANCO")
public class TmBanco implements Serializable {
	private static final long serialVersionUID = 1L;
	private long bancoId;
	private String estado;
	private String nombre;
	private Date tsCrea;
	private Date tsUltModi;
	private String usrCrea;
	private String usrUltModi;
	private Set<PagoCheque> pagoCheques;

    public TmBanco() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="BANCO_ID", unique=true, nullable=false)
	public long getBancoId() {
		return this.bancoId;
	}

	public void setBancoId(long bancoId) {
		this.bancoId = bancoId;
	}


	@Column(nullable=false, length=1)
	public String getEstado() {
		return this.estado;
	}

	public void setEstado(String estado) {
		this.estado = estado;
	}


	@Column(nullable=false, length=100)
	public String getNombre() {
		return this.nombre;
	}

	public void setNombre(String nombre) {
		this.nombre = nombre;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_CREA")
	public Date getTsCrea() {
		return this.tsCrea;
	}

	public void setTsCrea(Date tsCrea) {
		this.tsCrea = tsCrea;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_MODI")
	public Date getTsUltModi() {
		return this.tsUltModi;
	}

	public void setTsUltModi(Date tsUltModi) {
		this.tsUltModi = tsUltModi;
	}


	@Column(name="USR_CREA", length=15)
	public String getUsrCrea() {
		return this.usrCrea;
	}

	public void setUsrCrea(String usrCrea) {
		this.usrCrea = usrCrea;
	}


	@Column(name="USR_ULT_MODI", length=15)
	public String getUsrUltModi() {
		return this.usrUltModi;
	}

	public void setUsrUltModi(String usrUltModi) {
		this.usrUltModi = usrUltModi;
	}


	//bi-directional many-to-one association to PagoCheque
	@OneToMany(mappedBy="tmBanco")
	public Set<PagoCheque> getPagoCheques() {
		return this.pagoCheques;
	}

	public void setPagoCheques(Set<PagoCheque> pagoCheques) {
		this.pagoCheques = pagoCheques;
	}
	
}